home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / class / numbary.c < prev    next >
C/C++ Source or Header  |  1997-04-16  |  1KB  |  64 lines

  1.  
  2.  
  3. /*  Copyright (c) 1993-1996 Algorithms Corporation  */
  4. /*  All rights reserved.  */
  5.  
  6.  
  7.  
  8.  
  9. /*  This file automatically generated by dpp - do not edit  */
  10.  
  11. #define    DPP_STRATEGY    2
  12. #define    DPP_FASTWIDE    0
  13.  
  14.  
  15.  
  16.  
  17. #define    CLASS    NumberArray_c
  18. #define    ivType    NumberArray_iv_t
  19.  
  20. #include "generics.h"
  21.  
  22. object    NumberArray_c;
  23.  
  24.  
  25.  
  26. #line 27 "numbary.c"
  27.  
  28. objrtn    NumberArray_initialize(void)
  29. {
  30.     static  CRITICALSECTION  cs;
  31.     static  int volatile once = 0;
  32.  
  33.     ENTERCRITICALSECTION(_CI_CS_);
  34.     if (!once) {
  35.         INITIALIZECRITICALSECTION(cs);
  36.         once = 1;
  37.     }
  38.     LEAVECRITICALSECTION(_CI_CS_);
  39.  
  40.     ENTERCRITICALSECTION(cs);
  41.  
  42.     if (NumberArray_c) {
  43.         LEAVECRITICALSECTION(cs);
  44.         return NumberArray_c;
  45.     }
  46.     INHIBIT_THREADER;
  47.     Array_initialize();
  48.     if (NumberArray_c)  {
  49.         ENABLE_THREADER;
  50.         LEAVECRITICALSECTION(cs);
  51.         return NumberArray_c;
  52.     }
  53.     NumberArray_c = gNewClass(Class, "NumberArray", 0, 0, Array, END);
  54.  
  55.     ENABLE_THREADER;
  56.  
  57.     LEAVECRITICALSECTION(cs);
  58.  
  59.     return NumberArray_c;
  60. }
  61.  
  62.  
  63.  
  64.